package com.teen9g.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class User implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    private String username;
    private String password;
    private Integer level;
    private String avatarUrl;
    private Integer editTimes;
    //新增字段
    private String signature; //个性签名
    private Integer fansCount; //粉丝数
    private Integer followsCount; //关注数
    private Integer likeCount; //点赞数
    private String nickName; //昵称
    private Integer age; //年龄
    private String gender; //性别
    private String email; //邮箱
    private String phone; //电话
    private String region; //地区
    private String occupation; //职业
    private String hobbies; //爱好
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime recentLoginTime;
}
